from fastapi import APIRouter

from app.core.responses import Response
from app.services.category import CategoryServices

router = APIRouter(prefix="/category")


@router.get("", summary="获取分类")
async def index():
    data = CategoryServices.get_all()
    return Response.success(data.serialize())
